package com.chushouya.order.dto.api.clerk;

//=====order.constants.*;
import com.chushouya.order.constants.*;
import com.chushouya.order.constants.*;
import com.chushouya.order.dto.api.clerk.action.ClerkOrderAction;
import com.chushouya.order.dto.admin.orderaddress.OrderAddressDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("业务员订单详情")
public class ClerkOrderDetailDTO {

    @ApiModelProperty("订单ID")
    private Long orderId;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("订单类型")
    private Integer bizType;

    @ApiModelProperty("预付类型")
    private Integer prepaidType;

    @ApiModelProperty("订单来源(0:官方 1:自主 2:回头客 3:一单多台)")
    private Integer orderSource;

    @ApiModelProperty("订单来源(0:官方 1:自主 2:回头客 3:一单多台)")
    private String orderSourceDesc;

    @ApiModelProperty("商品条码")
    private String productBarCode;

    @ApiModelProperty("下单型号名称")
    private String productName;

    @ApiModelProperty("合作商ID")
    private Long partnerId;

    @ApiModelProperty("评估价")
    private BigDecimal evaluatePrice;

    @ApiModelProperty("预付金额")
    private BigDecimal prepaidPrice;

    @ApiModelProperty("加价金额")
    private BigDecimal bonusPrice;

    @ApiModelProperty("订单总额")
    private BigDecimal orderPrice;

    @ApiModelProperty("质检价格")
    private BigDecimal qualityPrice;

    @ApiModelProperty("成交价")
    private BigDecimal completePrice;

    @ApiModelProperty("售出价")
    private BigDecimal salePrice;

    @ApiModelProperty("下单时间")
    private Date createTime;

    @ApiModelProperty("预约上门开始时间")
    private Date appointStartTime;

    @ApiModelProperty("预约上门截止时间")
    private Date appointEndTime;

    @ApiModelProperty("派单时间")
    private Date dispatchTime;

    @ApiModelProperty("确认时间")
    private Date confirmTime;

    @ApiModelProperty("发货时间")
    private Date deliveryTime;

    @ApiModelProperty("接单时间")
    private Date acceptTime;

    @ApiModelProperty("上门时间")
    private Date visitTime;

    @ApiModelProperty("完成时间")
    private Date completeTime;

    @ApiModelProperty("入库时间")
    private Date stockTime;

    @ApiModelProperty("售出时间")
    private Date saleTime;

    @ApiModelProperty("合作商名称")
    private String partnerName;

    @ApiModelProperty("订单物流状态")
    private Integer logisticsStatus;

    @ApiModelProperty("订单物流状态")
    private String logisticsStatusDesc;

    @ApiModelProperty("订单状态")
    private Integer orderStatus;

    @ApiModelProperty("订单状态")
    private String orderStatusDesc;

    @ApiModelProperty("支付状态")
    private Integer payStatus;

    @ApiModelProperty("支付状态")
    private String payStatusDesc;

    @ApiModelProperty("平台")
    private String platform;

    @ApiModelProperty("平台")
    private String platformText;

    @ApiModelProperty("用户姓名")
    private String userName;

    @ApiModelProperty("用户手机号")
    private String userPhone;

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("订单地址")
    private OrderAddressDTO orderAddress;

    @ApiModelProperty("产品信息")
    private ClerkOrderProductDTO orderProduct;

    @ApiModelProperty("订单备注")
    private String orderRemark;

    private List<ClerkOrderAction> orderActions;

    public String getOrderStatusDesc() {
        return OrderStatusEnum.getDesc(this.orderStatus);
    }

    public String getPayStatusDesc() {
        return OrderPayStatusEnum.getDesc(this.payStatus);
    }

    public String getLogisticsStatusDesc() {
        return LogisticsStatusEnum.getDesc(this.logisticsStatus);
    }

    public String getOrderSourceDesc() {
        return OrderSourceEnum.getDesc(this.orderSource);
    }

    public String getPlatformText() {
        return OrderPlatformEnum.getDesc(this.platform);
    }
}
